package com.example.demo.context;

public class EnvironContext extends BaseContext {
	 /**
     * 远程地址
     */
    private String remoteAddr;

    /**
     * JSONP回调参数，用于判定jsonp调用
     */
    private String callback;

    /**
     * 标识整个生命周期的日志ID
     */
    private String logid;

    /**
     * 当前业务类型
     */
    private String busiType;

    /**
     * Mac地址
     */
    private String macAddr;
    /**
     * 是否ajax调用
     */
    private boolean ajax;

    /**
     * 路由键
     */
    private String routeKey;

    /**
     * 路由模式
     */
    private String routeMode;

    public String getRemoteAddr() {
        return remoteAddr;
    }

    public void setRemoteAddr(String remoteAddr) {
        this.remoteAddr = remoteAddr;
        this.put("context_remoteaddr", remoteAddr);
    }

    public String getCallback() {
        return callback;
    }

    public void setCallback(String callback) {
        this.callback = callback;
    }

    public String getLogid() {
        return logid;
    }

    public void setLogid(String logid) {
        this.logid = logid;
        this.put("context_logid", logid);
    }

    public String getBusiType() {
        return busiType;
    }

    public void setBusiType(String busiType) {
        this.busiType = busiType;
        this.put("context_busitype", busiType);
    }

    public boolean isAjax() {
        return ajax;
    }

    public void setAjax(boolean ajax) {
        this.ajax = ajax;
    }

    public String getMacAddr() {
        return macAddr;
    }

    public void setMacAddr(String macAddr) {
        this.macAddr = macAddr;
    }

    public String getRouteKey() {
        return routeKey;
    }

    public void setRouteKey(String routeKey) {
        this.routeKey = routeKey;
        this.put("context_routekey", routeKey);
    }

    public String getRouteMode() {
        return routeMode;
    }

    public void setRouteMode(String routeMode) {
        this.routeMode = routeMode;
    }

    @Override
    public void clear() {
        super.clear();
        this.remoteAddr = null;
        this.busiType = null;
        this.logid = null;
        this.callback = null;
        this.ajax = false;
        this.macAddr = null;
        this.routeKey = null;
        this.routeMode = null;
    }
}
